package com.cy.nginx;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.rsocket.RSocketProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication

public class NginxApplication {

    public static void main(String[] args) {
        SpringApplication.run(NginxApplication.class, args);
    }

    @RestController
    public class helloController {
        @Value(value = "${server.port}")
         private String server;

        @GetMapping("/hello")
        public String doSayHello() {
            return server + "sayhello";
        }
    }
}
